<?php

class EventController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
    	$empty = new Zend_Validate_NotEmpty(array('integer'));
    	$validators = array('id' => array('Int', $empty));
	    $input = new Zend_Filter_Input(null, $validators);
	    $input->setData($this->getRequest()->getParams());
	    if($input->isValid()){
	    	$event = new Application_Model_DbTable_Event();
	    	$this->view->event = $event->GetEventById($input->id);
	    }
	    else{
	    	throw new Zend_Controller_Action_Exception('Invalid input');
	    }
		
    }
}